package com.victualler.core.common.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @Aouthor Guoshichang
 * @Date 12:06 on 2018/7/26.
 * @Function
 */
public class CompareUtil {
    /**
     * @author Guoshichang
     * @since 12:07 on 2018/7/26.
     * @param str 待匹配的字符
     * @Function 判断字符是否是中文
     */
    public static boolean isChinese(String str) {
        String regEx = "[\u4e00-\u9fa5]";
        Pattern pat = Pattern.compile(regEx);
        Matcher matcher = pat.matcher(str);
        return matcher.find();
    }
}
